<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="WorkflowCreateDlg" widgetVar="WorkflowCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateWorkflowTitle}" closeOnEscape="true">

            <h:form id="WorkflowCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2">


                        <p:outputLabel value="#{bundle.CreateWorkflowLabel_documento}" for="documento" />
                        <h:panelGroup>
                            <p:inputText id="documento" value="#{workflowController.selected.documento}" title="#{bundle.CreateWorkflowTitle_documento}" required="true" requiredMessage="#{bundle.CreateWorkflowRequiredMessage_documento}"/>
                            <p:tooltip for="documento" value="#{workflowController.getComponentMessages('documento', bundle.CreateWorkflowHelpText_documento)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.CreateWorkflowLabel_faseAtual}" for="faseAtual" />
                        <h:panelGroup>
                            <p:inputText id="faseAtual" value="#{workflowController.selected.faseAtual}" title="#{bundle.CreateWorkflowTitle_faseAtual}"/>
                            <p:tooltip for="faseAtual" value="#{workflowController.getComponentMessages('faseAtual', bundle.CreateWorkflowHelpText_faseAtual)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.CreateWorkflowLabel_gatilho}" for="gatilho" />
                        <h:panelGroup>
                            <p:inputText id="gatilho" value="#{workflowController.selected.gatilho}" title="#{bundle.CreateWorkflowTitle_gatilho}"/>
                            <p:tooltip for="gatilho" value="#{workflowController.getComponentMessages('gatilho', bundle.CreateWorkflowHelpText_gatilho)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.CreateWorkflowLabel_faseDestino}" for="faseDestino" />
                        <h:panelGroup>
                            <p:inputText id="faseDestino" value="#{workflowController.selected.faseDestino}" title="#{bundle.CreateWorkflowTitle_faseDestino}"/>
                            <p:tooltip for="faseDestino" value="#{workflowController.getComponentMessages('faseDestino', bundle.CreateWorkflowHelpText_faseDestino)}"/>
                        </h:panelGroup>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{workflowController.saveNew}" value="#{bundle.Save}" update="display,:WorkflowListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,WorkflowCreateDialog);">
                        <p:confirm header="#{bundle.ConfirmationHeader}" message="#{bundle.ConfirmCreateMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>

                    <p:commandButton value="#{bundle.Cancel}" onclick="WorkflowCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
